package com.zcx.qshop.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2015/11/25.
 */
@HttpInlet(Conn.INLET_JSON_ORDERUPDATECOUPON)
public class JsonOrderupdatecouponAsyGet extends QSAsyGet<String> {

    public String orderid, couponid;

    public JsonOrderupdatecouponAsyGet(String orderid, String couponid, AsyCallBack<String> asyCallBack) {

        super(asyCallBack);

        this.orderid = orderid;

        this.couponid = couponid;

    }

    @Override
    protected String parser(JSONObject object) {

        if(object.optString("message").equals("1")){

            return object.optString("amount");

        }

        return null;

    }

}
